<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
    <title>文件查看</title>
    <link type="text/css" rel="stylesheet" th:href="@{/assets/lib/elementui/index.css}">
    <link type="text/css" rel="stylesheet" th:href="@{/assets/css/index.css}">
</head>
<body>
<div v-cloak id="app">
    <pre v-text="content"></pre>
</div>
<script type="text/javascript" th:src="@{/assets/lib/vue.min.js}"></script>
<script type="text/javascript" th:src="@{/assets/lib/elementui/index.js}"></script>
<script type="text/javascript" th:src="@{/assets/lib/axios.min.js}"></script>
<script type="text/javascript" th:src="@{/assets/js/vue-utils.js}"></script>
<script type="text/javascript">
    new Vue({
        el: '#app',
        data() {
            return {
                content: '',
            }
        },
        mounted() {
            this.$http.get(`/api/v1/file/action/show${window.location.search}`)
                .then(res => {
                    this.content = res.data;
                })
                .catch(err => {
                    console.error(err);
                    this.$notice.err('发生错误');
                })
        },
    });
</script>
</body>
</html>
